package com.atguigu.springcloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 购票记录表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_movieticket_buy")
@ApiModel(value = "MovieTicketInfo", description = "购票记录表")
public class MovieTicketInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "购买的电影的id")
    private Integer movieId;

    @ApiModelProperty(value = "购买的数量")
    private Integer number;

    @ApiModelProperty(value = "购买的用户的id")
    private Integer userId;

    @ApiModelProperty(value = "取票码 4 位长度")
    private String ticketCode;

    @ApiModelProperty(value = "支付金额(单价*数量)")
    private BigDecimal payAmount;

}
